3.376 \(\int \frac {1-3 \tan (x)}{\sqrt {4+3 \tan (x)}} \, dx\)

Optimal. Leaf size=27 \[ \sqrt {2} \tanh ^{-1}\left (\frac {\tan (x)+3}{\sqrt {2} \sqrt {3 \tan (x)+4}}\right ) \]

[Out]

arctanh(1/2*(3+tan(x))*2^(1/2)/(4+3*tan(x))^(1/2))*2^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {3535, 207} \[ \sqrt {2} \tanh ^{-1}\left (\frac {\tan (x)+3}{\sqrt {2} \sqrt {3 \tan (x)+4}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(1 - 3*Tan[x])/Sqrt[4 + 3*Tan[x]],x]

[Out]

Sqrt[2]*ArcTanh[(3 + Tan[x])/(Sqrt[2]*Sqrt[4 + 3*Tan[x]])]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 3535

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*
d^2)/f, Subst[Int[1/(2*b*c*d - 4*a*d^2 + x^2), x], x, (b*c - 2*a*d - b*d*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]
]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && EqQ[2
*a*c*d - b*(c^2 - d^2), 0]

Rubi steps

\begin {align*} \int \frac {1-3 \tan (x)}{\sqrt {4+3 \tan (x)}} \, dx &=-\left (18 \operatorname {Subst}\left (\int \frac {1}{-162+x^2} \, dx,x,\frac {27+9 \tan (x)}{\sqrt {4+3 \tan (x)}}\right )\right )\\ &=\sqrt {2} \tanh ^{-1}\left (\frac {3+\tan (x)}{\sqrt {2} \sqrt {4+3 \tan (x)}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.13, size = 65, normalized size = 2.41 \[ \frac {1}{5} \left ((3+i) \sqrt {4-3 i} \tanh ^{-1}\left (\frac {\sqrt {3 \tan (x)+4}}{\sqrt {4-3 i}}\right )+(3-i) \sqrt {4+3 i} \tanh ^{-1}\left (\frac {\sqrt {3 \tan (x)+4}}{\sqrt {4+3 i}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 - 3*Tan[x])/Sqrt[4 + 3*Tan[x]],x]

[Out]

((3 + I)*Sqrt[4 - 3*I]*ArcTanh[Sqrt[4 + 3*Tan[x]]/Sqrt[4 - 3*I]] + (3 - I)*Sqrt[4 + 3*I]*ArcTanh[Sqrt[4 + 3*Ta
n[x]]/Sqrt[4 + 3*I]])/5

________________________________________________________________________________________

fricas [B]  time = 0.56, size = 47, normalized size = 1.74 \[ \frac {1}{2} \, \sqrt {2} \log \left (\frac {\tan \relax (x)^{2} + 2 \, {\left (\sqrt {2} \tan \relax (x) + 3 \, \sqrt {2}\right )} \sqrt {3 \, \tan \relax (x) + 4} + 12 \, \tan \relax (x) + 17}{\tan \relax (x)^{2} + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-3*tan(x))/(4+3*tan(x))^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*log((tan(x)^2 + 2*(sqrt(2)*tan(x) + 3*sqrt(2))*sqrt(3*tan(x) + 4) + 12*tan(x) + 17)/(tan(x)^2 + 1)
)

________________________________________________________________________________________

giac [B]  time = 0.14, size = 57, normalized size = 2.11 \[ \frac {1}{2} \, \sqrt {2} \log \left (\frac {3}{5} \cdot 25^{\frac {1}{4}} \sqrt {10} \sqrt {3 \, \tan \relax (x) + 4} + 3 \, \tan \relax (x) + 9\right ) - \frac {1}{2} \, \sqrt {2} \log \left (-\frac {3}{5} \cdot 25^{\frac {1}{4}} \sqrt {10} \sqrt {3 \, \tan \relax (x) + 4} + 3 \, \tan \relax (x) + 9\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-3*tan(x))/(4+3*tan(x))^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(2)*log(3/5*25^(1/4)*sqrt(10)*sqrt(3*tan(x) + 4) + 3*tan(x) + 9) - 1/2*sqrt(2)*log(-3/5*25^(1/4)*sqrt(
10)*sqrt(3*tan(x) + 4) + 3*tan(x) + 9)

________________________________________________________________________________________

maple [B]  time = 0.12, size = 52, normalized size = 1.93 \[ -\frac {\sqrt {2}\, \ln \left (9+3 \tan \relax (x )-3 \sqrt {2}\, \sqrt {4+3 \tan \relax (x )}\right )}{2}+\frac {\sqrt {2}\, \ln \left (9+3 \tan \relax (x )+3 \sqrt {2}\, \sqrt {4+3 \tan \relax (x )}\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-3*tan(x))/(4+3*tan(x))^(1/2),x)

[Out]

-1/2*2^(1/2)*ln(9+3*tan(x)-3*2^(1/2)*(4+3*tan(x))^(1/2))+1/2*2^(1/2)*ln(9+3*tan(x)+3*2^(1/2)*(4+3*tan(x))^(1/2
))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\int \frac {3 \, \tan \relax (x) - 1}{\sqrt {3 \, \tan \relax (x) + 4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-3*tan(x))/(4+3*tan(x))^(1/2),x, algorithm="maxima")

[Out]

-integrate((3*tan(x) - 1)/sqrt(3*tan(x) + 4), x)

________________________________________________________________________________________

mupad [B]  time = 7.11, size = 35, normalized size = 1.30 \[ \sqrt {2}\,\left (\mathrm {atan}\left (\sqrt {6\,\mathrm {tan}\relax (x)+8}\,\left (\frac {1}{10}-\frac {3}{10}{}\mathrm {i}\right )\right )-\mathrm {atan}\left (\sqrt {6\,\mathrm {tan}\relax (x)+8}\,\left (\frac {1}{10}+\frac {3}{10}{}\mathrm {i}\right )\right )\right )\,1{}\mathrm {i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(3*tan(x) - 1)/(3*tan(x) + 4)^(1/2),x)

[Out]

2^(1/2)*(atan((6*tan(x) + 8)^(1/2)*(1/10 - 3i/10)) - atan((6*tan(x) + 8)^(1/2)*(1/10 + 3i/10)))*1i

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \int \frac {3 \tan {\relax (x )}}{\sqrt {3 \tan {\relax (x )} + 4}}\, dx - \int \left (- \frac {1}{\sqrt {3 \tan {\relax (x )} + 4}}\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-3*tan(x))/(4+3*tan(x))**(1/2),x)

[Out]

-Integral(3*tan(x)/sqrt(3*tan(x) + 4), x) - Integral(-1/sqrt(3*tan(x) + 4), x)

________________________________________________________________________________________